/*
 * @Author: your name
 * @Date: 2021-09-12 21:47:18
 * @LastEditTime: 2022-06-02 16:27:39
 * @LastEditors: 夏郑兴 971348024@qq.com
 * @Description: In User Settings Edit
 * @FilePath: /bigdata-manage-ui/Users/xzx/Desktop/A-xichen/project/vue-ecommerce-system/src/router/modules/serviceRouting.ts
 */
import Layout from '@/layout/index.vue'
import { createNameComponent } from '../createNode'
// import { useStore } from "vuex";
// const store = useStore();
// console.log(localStorage.vuex)
// if (localStorage.vuex) {
//   var vuexData = JSON.parse(localStorage.vuex)
//   var adminInfo = vuexData.user.adminInfo;
// }


const route = [
  {
    path: '/',
    component: Layout,
    redirect: '/backstagerpzzm/projectManagement',
    meta: { icon: 'el-icon-document', hideClose: true, }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: '/backstagerpzzm/projectManagement',
        component: createNameComponent(() => import('@/views/servicePages/projectManagement/projectManagement.vue')),
        meta: { title: 'message.pages.projectManagement', cache: true, }
      }
    ]
  },
  {
    path: '/backstagerpzzm/projectDetail',
    component: Layout,
    // redirect: '/backstagerpzzm/projectManagement',
    redirect: '/backstagerpzzm/projectDetail/projectDetail',
    hideMenu: true,
    meta: { title: 'message.pages.projectManagement', icon: 'el-icon-document-copy' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'projectDetail',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/projectManagement/projectDetail.vue')),
        meta: { title: 'message.pages.projectDetail', cache: true, }
      }
    ]
  },
  {
    path: '/backstagerpzzm/projectEdit',
    component: Layout,
    redirect: '/backstagerpzzm/projectDetail',
    hideMenu: true,
    meta: { title: 'message.pages.projectDetail', icon: 'el-icon-document-copy' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'projectEdit',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/projectManagement/projectEdit.vue')),
        meta: { title: 'message.pages.projectEdit' }
      }
    ]
  },
  {
    path: '/backstagerpzzm/userManagement',
    component: Layout,
    redirect: '/backstagerpzzm/userManagement/userProjectAnalysis',
    meta: { title: 'message.pages.userManagement', icon: 'el-icon-s-custom' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'userProjectAnalysis',
        component: createNameComponent(() => import('@/views/servicePages/userManagement/userProjectAnalysis.vue')),
        meta: { title: 'message.pages.userProjectAnalysis' }
      },
      {
        path: 'userQuestions',
        component: createNameComponent(() => import('@/views/servicePages/userManagement/userQuestions.vue')),
        meta: { title: 'message.pages.userQuestions' }
      },

    ]
  },
  {
    path: '/backstagerpzzm/accountManagement',
    component: Layout,
    redirect: '/backstagerpzzm/accountManagement/userAccessManagement',
    meta: { title: 'message.pages.accountManagement', icon: 'el-icon-document-copy' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'userAccessManagement',
        component: createNameComponent(() => import('@/views/servicePages/accountManagement/userAccessManagement.vue')),
        meta: { title: 'message.pages.userAccessManagement' }
      }, {
        path: 'provideMoney',
        component: createNameComponent(() => import('@/views/servicePages/accountManagement/provideMoney.vue')),
        meta: { title: 'message.pages.provideMoney' }
      },
      {
        path: 'adminAccessManagement',
        component: createNameComponent(() => import('@/views/servicePages/accountManagement/adminAccessManagement.vue')),
        meta: { title: 'message.pages.adminAccessManagement' }
      },
      {
        path: 'changePassword',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/accountManagement/changePassword.vue')),
        meta: { title: 'message.pages.changePassword' }
      },
      {
        path: 'addAccess',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/accountManagement/addAccess.vue')),
        meta: { title: 'message.pages.addAccess' }
      }
    ]
  },
  {
    path: '/backstagerpzzm/notificationMessage',
    component: Layout,
    redirect: '/backstagerpzzm/notificationMessage/notificationMessage',
    meta: { icon: 'el-icon-chat-line-square', title: 'message.pages.notificationMessage' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'notificationMessage',
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/notificationMessage.vue')),
        meta: { title: 'message.pages.notificationMessage', cache: true, }
      }, {
        path: 'articleList',
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/articleList.vue')),
        meta: { title: 'message.pages.articleList', cache: true, }
      }, {
        path: 'sysArticleList',
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/sysArticleList.vue')),
        meta: { title: 'message.pages.sysArticleList', cache: true, }
      }, {
        path: 'addSysArticle',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/addSysArticle.vue')),
        meta: { title: 'message.pages.addSysArticle' }
      }, {
        path: 'addNotification',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/addNotification.vue')),
        meta: { title: 'message.pages.addNotification' }
      }, {
        path: 'addArticle',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/notificationMessage/addArticle.vue')),
        meta: { title: 'message.pages.addArticle' }
      },

    ]
  },
  // {
  //   path: '/backstagerpzzm/addNotification',
  //   component: Layout,
  //   hideMenu: true,
  //   redirect: '/backstagerpzzm/addNotification',
  //   meta: { title: 'message.pages.addNotification', icon: 'el-icon-chat-line-square' }, // hideClose: true 隐藏删除按钮
  //   children: [
  //     {
  //       path: 'addNotification',
  //       hideMenu: true,
  //       component: createNameComponent(() => import('@/views/servicePages/notificationMessage/addNotification.vue')),
  //       meta: { title: 'message.pages.addNotification' }
  //     },
  //   ]
  // },
  {
    path: '/backstagerpzzm/dataManagement',
    component: Layout,
    redirect: '/backstagerpzzm/dataManagement',
    meta: { icon: 'el-icon-s-grid', title: 'message.pages.dataManagement' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'dataManagement',
        component: createNameComponent(() => import('@/views/servicePages/dataManagement/dataManagement.vue')),
        meta: { title: 'message.pages.dataManagement' }
      }, {
        path: 'prohibitedWords',
        component: createNameComponent(() => import('@/views/servicePages/dataManagement/prohibitedWords.vue')),
        meta: { title: 'message.pages.prohibitedWords' }
      }, {
        path: 'dataOperation',
        component: createNameComponent(() => import('@/views/servicePages/dataManagement/dataOperation.vue')),
        meta: { title: 'message.pages.dataOperation' }
      },
    ]
  },
 
  {
    path: '/backstagerpzzm/teamManage',
    component: Layout,
    redirect: '/backstagerpzzm/teamManage/teamSetting',
    meta: { icon: 'el-icon-s-grid', title: 'message.pages.teamManage' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'teamSetting',
        component: createNameComponent(() => import('@/views/servicePages/teamManage/teamSetting.vue')),
        meta: { title: 'message.pages.teamSetting' }
      },
      {
        path: 'teamSettingIncome',
        component: createNameComponent(() => import('@/views/servicePages/teamManage/settingIncome.vue')),
        meta: { title: 'message.pages.settingIncome' }
      },
      {
        path: 'teamList',
        component: createNameComponent(() => import('@/views/servicePages/teamManage/teamList.vue')),
        meta: { title: 'message.pages.teamList' }
      },
      {
        path: 'teamDetail',
        hideMenu: true,
        component: createNameComponent(() => import('@/views/servicePages/teamManage/teamDetail.vue')),
        meta: { title: 'message.pages.teamDetail' }
      },
    ]
  }, {
    path: '/backstagerpzzm/exchangeManage',
    component: Layout,
    redirect: '/backstagerpzzm/exchangeManage/exchangeManage',
    meta: { icon: 'el-icon-s-grid', title: 'message.pages.exchangeManage' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'exchangeManage',
        component: createNameComponent(() => import('@/views/servicePages/exchangeManage/exchangeManage.vue')),
        meta: { title: 'message.pages.exchangeManage' }
      }, {
        path: 'goodsList',
        component: createNameComponent(() => import('@/views/servicePages/exchangeManage/goodsList.vue')),
        meta: { title: 'message.pages.goodsList' }
      },

    ]
  },
  {
    path: '/backstagerpzzm/advertisement',
    component: Layout,
    redirect: '/backstagerpzzm/advertisement/index',
    meta: { icon: 'el-icon-s-grid', title: 'message.pages.exchangeManage' }, //
    children: [
      {
        path: 'index',
        component: createNameComponent(() => import('@/views/servicePages/advertisement/index.vue')),
        meta: { title: 'message.pages.advertisement' }
      },

    ]
  },
  {
    path: '/backstagerpzzm/otherPage',
    component: Layout,
    redirect: '/backstagerpzzm/otherPage/mobileSetting',
    meta: { icon: 'el-icon-s-grid', title: 'message.pages.mobileSetting' }, // hideClose: true 隐藏删除按钮
    children: [
      {
        path: 'mobileSetting',
        component: createNameComponent(() => import('@/views/servicePages/otherPage/mobileSetting.vue')),
        meta: { title: 'message.pages.mobileSetting' }
      },
    ]
  },
]

export default route
